<template>
	<view>
		<nav-bar>
			<template v-slot:left-holder>
				<view class="nav">
					<view :class="navCurrent==1?'nav-selected':'nav-select'" @click="chooseNav(1)">推荐</view>
					<view :class="navCurrent==2?'nav-selected':'nav-select'" @click="chooseNav(2)">关注</view>
				</view>
			</template>
			<template v-slot:right-holder>
				<view class="nav-icon">
					<image class="icon marrig20" src="@/static/search-icon.png" mode=""></image>
					<image class="icon" src="@/static/play-icon.png"></image>
				</view>
			</template>
		</nav-bar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				navCurrent: 1
			};
		},
		methods: {
			chooseNav(type) {
				this.navCurrent = type
			}
		}
	}
</script>

<style lang="scss">
	.nav {
		@include flex-row(center, center);

		.nav-selected {
			color: $main-theme;
			font-size: 36rpx;
			margin-right: 40rpx;
			font-weight: 500;
		}

		.nav-select {
			color: $gray-color;
			font-size: 30rpx;
			margin-right: 40rpx;
		}
	}

	.nav-icon {
		@include flex-row(center, center);
	}
</style>